<template>
  <form action="http://best.cnblogs.com" method="get" @submit.prevent>
    <input name="username" />
    <button @click="eventMethod" type="button">不是提交</button>
    <button @click="eventMethod">不提交</button>
  </form>

  <hr />

  <input v-on="{ mouseup: eventMethod, mousedown: eventMethod }" />
  <input :="{ mouseup: eventMethod, mousedown: eventMethod }" />
  <!--无效方法-->
</template>

<script lang="ts">
import { reactive, ref } from "vue";
export default {
  setup() {
    let eventMethod = (e) => {
      console.log(e.type, e);
    };
    return { eventMethod };
  },
};
</script>
<style scoped>
#div1 {
  width: 300px;
  height: 100px;
  background: lightgoldenrodyellow;
  overflow: auto;
}

#div1 li {
  margin: 20px;
  background-color: aquamarine;
  height: 100px;
  width: 200px;
}
</style>
